@extends('Layout.Index')
@section('css')
    <link href="{{asset('css/plugins/bootstrap-switch-master/css/bootstrap3/bootstrap-switch.css')}}" rel="stylesheet">
    <link href="{{asset('css/plugins/uploadify/uploadify.css')}}" rel="stylesheet">
@endsection
@section('content')
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>商城设置</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="panel panel-primary">
                            <div class="panel-heading alert-danger">使用须知:</div>
                            <div class="panel-body">
                                <ul>
                                    <li >网站全局基本设置，商城及其他模块相关内容在其各自栏目设置项内进行操作</li>
                                </ul>
                                </p>
                            </div>
                        </div>
                        <form class="form-horizontal" role="form" name="wetsite_setting">
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">站点名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="" placeholder="站点名称">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-2 control-label">ICP证书号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="" placeholder="ICP证书号">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-2 control-label">底部版权信息</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" rows="3"  placeholder="底部版权信息"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-2 control-label">默认时区</label>
                                <div class="col-sm-10">
                                    <select name="time_zone" value="8" class="form-control">
                                        <option value="-12">(GMT -12:00) Eniwetok, Kwajalein</option>
                                        <option value="-11">(GMT -11:00) Midway Island, Samoa</option>
                                        <option value="-10">(GMT -10:00) Hawaii</option>
                                        <option value="-9">(GMT -09:00) Alaska</option>
                                        <option value="-8">(GMT -08:00) Pacific Time (US &amp; Canada), Tijuana</option>
                                        <option value="-7">(GMT -07:00) Mountain Time (US &amp; Canada), Arizona</option>
                                        <option value="-6">(GMT -06:00) Central Time (US &amp; Canada), Mexico City</option>
                                        <option value="-5">(GMT -05:00) Eastern Time (US &amp; Canada), Bogota, Lima, Quito</option>
                                        <option value="-4">(GMT -04:00) Atlantic Time (Canada), Caracas, La Paz</option>
                                        <option value="-3.5">(GMT -03:30) Newfoundland</option>
                                        <option value="-3">(GMT -03:00) Brassila, Buenos Aires, Georgetown, Falkland Is</option>
                                        <option value="-2">(GMT -02:00) Mid-Atlantic, Ascension Is., St. Helena</option>
                                        <option value="-1">(GMT -01:00) Azores, Cape Verde Islands</option>
                                        <option value="0">(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia</option>
                                        <option value="1">(GMT +01:00) Amsterdam, Berlin, Brussels, Madrid, Paris, Rome</option>
                                        <option value="2">(GMT +02:00) Cairo, Helsinki, Kaliningrad, South Africa</option>
                                        <option value="3">(GMT +03:00) Baghdad, Riyadh, Moscow, Nairobi</option>
                                        <option value="3.5">(GMT +03:30) Tehran</option>
                                        <option value="4">(GMT +04:00) Abu Dhabi, Baku, Muscat, Tbilisi</option>
                                        <option value="4.5">(GMT +04:30) Kabul</option>
                                        <option value="5">(GMT +05:00) Ekaterinburg, Islamabad, Karachi, Tashkent</option>
                                        <option value="5.5">(GMT +05:30) Bombay, Calcutta, Madras, New Delhi</option>
                                        <option value="5.75">(GMT +05:45) Katmandu</option>
                                        <option value="6">(GMT +06:00) Almaty, Colombo, Dhaka, Novosibirsk</option>
                                        <option value="6.5">(GMT +06:30) Rangoon</option>
                                        <option value="7">(GMT +07:00) Bangkok, Hanoi, Jakarta</option>
                                        <option value="8" selected>(GMT +08:00) Beijing, Hong Kong, Perth, Singapore, Taipei</option>
                                        <option value="9">(GMT +09:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk</option>
                                        <option value="9.5">(GMT +09:30) Adelaide, Darwin</option>
                                        <option value="10">(GMT +10:00) Canberra, Guam, Melbourne, Sydney, Vladivostok</option>
                                        <option value="11">(GMT +11:00) Magadan, New Caledonia, Solomon Islands</option>
                                        <option value="12">(GMT +12:00) Auckland, Wellington, Fiji, Marshall Island</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-2 control-label">站点</label>
                                <div class="col-sm-3">
                                    <input class="form-control" type="checkbox" name="site_open_or_close" checked>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-2 control-label">关闭原因</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" rows="3"  placeholder="升级中。。。"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="button" class="btn btn-primary">确认提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>防灌水设置</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="panel panel-primary">
                            <div class="panel-heading alert-danger">使用须知:</div>
                            <div class="panel-body">
                                <ul>
                                    <li >选择是否开启登录、注册页面验证码功能。</li>
                                </ul>
                                </p>
                            </div>
                        </div>
                        <form class="form-horizontal" role="form" name="prevent_irrigation_setting">
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">使用验证码</label>
                                <div class="col-sm-10">
                                    <div class="checkbox checkbox-danger">
                                        <input type="checkbox" checked="" name="login">
                                        <label for="checkbox6">
                                            前台登入
                                        </label>
                                    </div>
                                    <div class="checkbox checkbox-danger">
                                        <input id="" type="checkbox" checked="" name="register">
                                        <label for="checkbox6">
                                            前台注册
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="button" class="btn btn-primary">确认提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>登入主题图片</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="panel panel-primary">
                            <div class="panel-heading alert-danger">使用须知:</div>
                            <div class="panel-body">
                                <ul>
                                    <li >网站登录/注册页面左侧图片，每次刷新可随机显示，最多可设置上传4张</li>
                                    <li >选择上传文件并提交表单生效，图片请依据输入框下提示文字内容选择</li>
                                </ul>
                                </p>
                            </div>
                        </div>
                        <form class="form-horizontal" role="form" name="prevent_irrigation_setting" id="prevent_irrigation_setting">
                            <div class="form-group">
                                <label for="inputEmail3" class="col-sm-2 control-label">主题轮换图片</label>
                                <div class="col-sm-10">
                                    <input type="file" name="file_upload" id="file_upload" />
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="button" class="btn btn-primary upload">确认提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('javascript')
    <script src="{{asset('js/plugins/bootstrap-switch-master/dist/js/bootstrap-switch.js')}}"></script>
    <script src="{{asset('js/plugins/webuploader/webuploader.min.js')}}"></script>
    <script src="{{asset('js/plugins/uploadify/jquery.uploadify.min.js')}}"></script>
    <script>
        //开关按钮
        $("[name='site_open_or_close']").bootstrapSwitch({
            onText: "开启",
            offText: "关闭",
            onColor: "success",
            offColor: "info",
            size: "small"
        });

        //上传插件
        $("#file_upload").uploadify({
            uploadLimit:4,
            buttonClass:'btn-primary',
            buttonText : '添加图片',
            formData: {'_token' : "{{csrf_token()}}"},
            auto     : false,
            swf      : '/js/plugins/uploadify/uploadify.swf',
            uploader : '/upload'
        });
        $('.upload').on('click',function () {
            $("#file_upload").uploadify('upload','*');
        });

    </script>
@endsection